package org.carrot2.examples.clustering;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.HashMap;

public class whiteList {
	
	public  HashMap<String, Boolean> readWhiteList(String file){
	
		HashMap<String, Boolean> list=new HashMap<String,Boolean>();
		
		
		try {
		      FileInputStream fstream = new FileInputStream(file);
		      DataInputStream in = new DataInputStream(fstream);
		      BufferedReader br = new BufferedReader(new InputStreamReader(in));
		      String str;
		      while ((str = br.readLine()) != null) {
		    	  list.put(str, true);
		      }
		      in.close();
		    } catch (Exception e) {
		      System.err.println(e);
		      System.err.println("error is here");
		    }
		return list;
	}

	
}
